﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace ACS.Debugger.DebugInfo
{
  [XmlRoot("UserProcedure")]
  [XmlInclude(typeof(SingleType))]
  [XmlInclude(typeof(UserType))]
  public class UserProcedure
  {
    private string _NameAC;
    private string _NameCS;
    private List<TypeBase> _DataType;
    private List<Field> _InputParametrs;

    public void AddData(UserType y)
    {
      if (_DataType == null)
      {
        _DataType = new List<TypeBase>();
      }
      _DataType.Add(y);
    }

    [XmlAttribute("ac")]
    public string NameAC
    {
      get { return _NameAC; }
      set { _NameAC = value; }
    }
    [XmlAttribute("cs")]
    public string NameCS
    {
      get { return _NameCS; }
      set { _NameCS = value; }
    }
    [XmlElement("Data")] 
    public List<TypeBase> Data
    {
      get { return _DataType; }
      set { _DataType = value; }
    }
    [XmlElement("InputParametrs")]   
    public List<Field> InputParametrs
    {
      get { return _InputParametrs; }
      set { _InputParametrs = value; }
    }
  }
}
